﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;
using VoL.Domain.IServices.BasicData.Partial;
using VOL.Entity.DomainModels;

namespace VOL.WebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class NursingUnitWardController : ControllerBase
    {
        private readonly INursingUnitWardServices nursing;

        public NursingUnitWardController(INursingUnitWardServices nursing)
        {
            this.nursing = nursing;
        }
        /// <summary>
        /// 获取护理单元病房分配
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public List<NursingUnitWard> GetNursing()
        {
            return nursing.GetNursingUnitWard();
        }

        [HttpPost]
        public async Task<int> CreateNursingUnitWard([FromBody]VOL.Entity.DomainModels.NursingUnitWard list)
        {
            return await nursing.CreateNursingUnitWard(list);
        }
    }
}
